import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

const routes: Routes = [
  { path: '', pathMatch: 'full', redirectTo: '/jpa/basic' },
  { path: 'jpa', loadChildren: () => import('./pages/jpa/jpa.module').then(m => m.JpaModule) },
  { path: 'jpa/:type', loadChildren: () => import('./pages/jpa/jpa.module').then(m => m.JpaModule) },
  { path: 'showCode', loadChildren: () => import('./pages/show-code/show-code.module').then(m => m.ShowCodeModule) },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
